package com.wiz.main;

import java.io.UnsupportedEncodingException;

import com.wiz.data.factory.MessageDataFactory;
import com.wiz.data.util.HexUtil;
import com.wiz.data.vo.to.DataMessageTemplate;
import com.wiz.data.vo.to.MabDataTO;

public class Test {

	public static void main(String[] args) throws UnsupportedEncodingException {
		DataMessageTemplate template = new DataMessageTemplate();
		template.addMessageFiled("1", null);
		template.addMessageFiled("11", null);
		template.addMessageFiled("12", null);
		template.addMessageFiled("13", null);
		template.addMessageFiled("23", null);
		template.addMessageFiled("39", null);
		template.addMessageFiled("48", null);
		template.addMessageFiled("58", null);
		
		byte[] mtibs = MessageDataFactory.getInstance().getMtiMessage(template);
		String mab = "46310933F6058AEF2B540200000005008ECF1809000009000000E799BDE4BF8AE69DB031405900000000000031";
		byte[] mabbs = HexUtil.HexString2Bytes(mab);
		MabDataTO mabTO = MessageDataFactory.getInstance().getMabDataTO(mabbs, mtibs);
		System.out.println(mabTO.getValueByIndex(11));
		System.out.println(mabTO.getValueByIndex(12));
	}

}
